<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .headline {
            overflow: hidden;
            height: 50px;
            background-color: white;
            border-top: 5px solid pink;
            border-bottom: 1px solid #eedef0;
            display: flex; /* 使用flex布局 */
            align-items: center; /* 垂直居中对齐 */
        }
        .headline a {
            color: #4c4c4c;
            text-decoration: none;
            padding: 0 10px; /* 使用padding简化定义 */
            height: 50px;
            line-height: 50px;
            text-align: center;
            font-size: 12px;
        }
        .login {
            margin-left: auto; /* 将登录链接推到右侧 */
        }
        .headline a:hover {
            background-color: #4c4c4c;
            color: white;
            transition: background-color 0.6s ease, color 0.5s ease;
            opacity: 0.6; /* 背景色在0.5秒内以ease速度曲线过渡 */
        }
        .search {
            width: 412px;
            height: 30px;
            border: 1px solid #00a4ff;
            margin-left: 59px;
            display: flex; /* 修改为flex布局，简化内部排版 */
        }
        .search input {
            flex: 1; /* 输入框占据剩余空间 */
            height: 28px;
            border: 0;
            padding-left: 20px;
            font-size: 14px;
        }
        .search button {
            height: 30px; /* 按钮高度与输入框一致 */
        }
    </style>
</head>
<body>
<div class="headline">
    <a href="/myweb/selectAllByUserName">购物车</a>
    <a href="https://www.google.com">google（搜索引擎）</a>
    <a href="https://www.bilibili.com">bilibili（电商平台）</a>
    <a href="https://www.jd.com">京东（电商平台）</a>

    <!-- 搜索表单 -->
    <form action="/myweb/selectByBrandName" method="post" class="search-form">
        <input type="text" id="brandname" name="brandname" placeholder="请输入搜索内容" required>
        <button type="submit">搜索</button>
    </form>

    <a class="login" href="login.html">登录</a>
    <a class="login" href="register.html">注册</a>
</div>

</body>
</html>
